export const formConfig = {
	inline: false,
	showBtn: true,
	labelPosition: 'right',
	labelWidth: '120px',
	column: [
		{
			label: '模板编号',
			prop: 'templateId',
			maxlength: '50',
			showWordLimit: true,
			type: 'text',
			span: 24,
			rules: [{ required: true, message: '请输入模板编号' }],
		},
		{
			label: '模板名称',
			prop: 'templateName',
			maxlength: '50',
			showWordLimit: true,
			type: 'text',
			span: 24,
			rules: [{ required: true, message: '请输入模板名称' }],
		},
		{
			label: '短信内容',
			prop: 'content',
			maxlength: '250',
			showWordLimit: true,
			type: 'textarea',
			span: 24,
			rules: [{ required: true, message: '请输入短信内容' }],
		},
	],
}

export const searchConfig = {
	inline: true,
	showBtn: true,
	labelPosition: 'left',
	column: [
		{
			label: '模板名称',
			prop: 'templateName',
			type: 'input',
			span: 8,
		},
		{
			label: '短信内容',
			prop: 'content',
			type: 'input',
			span: 8,
		},
	],
}

export const tableConfig = {
	stripe: true,
	border: true,
	columns: [
		{ label: '模板编号', prop: 'templateId' },
		{ label: '模板名称', prop: 'templateName' },
		{ label: '短信内容', prop: 'content' },
		{ label: '创建人', prop: 'creator' },
		{ label: '创建时间', prop: 'createTime' },
		{
			label: '操作',
			prop: 'menu',
			width: 300,
			fixed: 'right',
		},
	],
}

export const api = {
	index: 'view_messageTemplate_page',
	add: 'view_messageTemplate_add',
	edit: 'view_messageTemplate_edit',
	delete: 'view_messageTemplate_del',
}
export const baseConfig = {
	pageName: '短信模板',
	dictcodes: [],
	rowKey: 'id',
	addLabel: '新增',
	tipLabel: 'templateName',
	exportMqTopic: '/ning/export/',
	api,
	auth: {
		...api,
		mulitSet: 'mulitSet',
	},
	menuBtn: [
		{
			icon: 'editor',
			label: '编辑',
			type: 'primary',
			operate: 'edit',
			auth: 'sys_role_edit',
			text: true,
			show: true,
		},
		{
			icon: 'delete',
			label: '删除',
			type: 'danger',
			operate: 'delete',
			auth: 'sys_role_del',
			text: true,
			show: true,
		},
	],
	dialogConfig: {
		width: '75%',
	},
	searchConfig,
	formConfig,
	tableConfig,
}
